<?php /*a:2:{s:64:"D:\laragon\www\uavshop\application\manage\view\system_index.html";i:1599802749;s:56:"D:\laragon\www\uavshop\application\manage\view\base.html";i:1596192950;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
	<meta name="renderer" content="webkit">
<title>后台管理系统</title>
<link rel="stylesheet" href="/static/public/awesome/css/font-awesome.min.css" />

<link rel="stylesheet" href="/static/public/layui/css/layui.css" />

<link rel="stylesheet" href="/static/public/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="/static/manage/css/style.css" />

	<link rel="stylesheet" href="/static/public/dist/zoomify.min.css">
	
<script src="/static/public/kindeditor/kindeditor-all.js"></script>
<script src="/static/public/kindeditor/lang/zh_CN.js"></script>
<script src="/static/public/ueditor/ueditor.config.js?t=<?php echo time();?>"></script>
<script src="/static/public/ueditor/ueditor.all.min.js"></script>
<script src="/static/public/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<?php if($is_auth): ?>

<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="<?php echo url('index/welcome'); ?>"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>系统</span>
            <span class="icon-angle-right"></span>
            <span>系统设置</span>
            <span class="icon-angle-right"></span>
            <span>系统设置</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <div class="m-tab-tit clearfix">
                <ul>
                    <li><a href="javascript:;">用户设置</a></li>
                    <li><a href="javascript:;">附件设置</a></li>
                    <li><a href="javascript:;" style="display: none">积分设置</a></li>
                    <li><a href="javascript:;" style="display: none">抵用券设置</a></li>
                    <li><a href="javascript:;" style="display: none">股东设置</a></li>
                    <li><a href="javascript:;" style="display: none">分销设置</a></li>
                </ul>
            </div>
            <div class="m-form mt-10">
                <form class="layui-form" id="j_form">
                    <div class="m-tab-con">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">后台用户</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td width="15%"><label for="login_nums">登录次数限制</label></td>
                                    <td><input type="text" class="u-ipt u-ipt-tiny" name="file[login_nums]" id="login_nums" value="<?php echo !empty($file['login_nums']) ? htmlentities($file['login_nums']) : htmlentities($site['default_login_nums']); ?>" /></td>
                                </tr>
                                <tr>
                                    <td><label for="login_time">重新登录时间间隔</label></td>
                                    <td><input type="text" class="u-ipt u-ipt-tiny" name="file[login_time]" id="login_time" value="<?php echo !empty($file['login_time']) ? htmlentities($file['login_time']) : htmlentities($site['default_login_time']); ?>" /><span>分钟</span></td>
                                </tr>
<!--                                <tr>-->
<!--                                    <th colspan="2">前台用户</th>-->
<!--                                </tr>-->
<!--                               <tr style="display: none">-->
<!--                                    <td width="15%"><label>站点是否开启</label></td>-->
<!--                                    <td>-->
<!--                                        <input type="radio" name="db[is_web]" value="1" title="开启"<?php if(isset($db['is_web']) && ($db['is_web'] == 1)): ?> checked<?php endif; ?> />-->
<!--                                        <input type="radio" name="db[is_web]" value="0" title="关闭"<?php if(isset($db['is_web']) && ($db['is_web'] == 0)): ?> checked<?php endif; ?> />-->
<!--                                    </td>-->
<!--                                </tr>-->

<!--                                <tr>-->
<!--                                    <td width="15%"><label>是否强制关注公众号</label></td>-->
<!--                                    <td>-->
<!--                                        <input type="radio" name="db[is_wx_subscribe]" value="1" title="开启"<?php if(isset($db['is_wx_subscribe']) && ($db['is_wx_subscribe'] == 1)): ?> checked<?php endif; ?> />-->
<!--                                        <input type="radio" name="db[is_wx_subscribe]" value="0" title="关闭"<?php if(isset($db['is_wx_subscribe']) && ($db['is_wx_subscribe'] == 0)): ?> checked<?php endif; ?> />-->
<!--                                    </td>-->
<!--                                </tr>-->
<!--                                <tr>-->
<!--                                    <td width="15%"><label>公众号关注路径</label></td>-->
<!--                                    <td>-->
<!--                                        <input type="text" name="db[is_wx_url]" value="<?php echo !empty($db['is_wx_url']) ? htmlentities($db['is_wx_url']) : ''; ?>" />-->
<!--                                    </td>-->
<!--                                </tr>-->

<!--                                <tr style="display: none">-->
<!--                                    <td width="15%"><label>会员注册</label></td>-->
<!--                                    <td>-->
<!--                                        <input type="radio" name="db[is_reg]" value="1" title="开启"<?php if(!$db || $db['is_reg'] == 1): ?> checked<?php endif; ?> />-->
<!--                                        <input type="radio" name="db[is_reg]" value="0" title="关闭"<?php if($db && $db['is_reg'] == 0): ?> checked<?php endif; ?> />-->
<!--                                    </td>-->
<!--                                </tr>-->
<!--                                <tr>-->
<!--                                    <td><label>默认注册会员组</label></td>-->
<!--                                    <td>-->
<!--                                        <div class="lay-select">-->
<!--                                            <select name="db[reg_role_id]">-->
<!--                                                <?php if(is_array($roles) || $roles instanceof \think\Collection || $roles instanceof \think\Paginator): if( count($roles)==0 ) : echo "" ;else: foreach($roles as $key=>$role): ?>-->
<!--                                                <option value="<?php echo htmlentities($role['id']); ?>"<?php if($db['reg_role_id'] == $role['id']): ?> selected<?php endif; ?>><?php echo htmlentities($role['name']); ?></option>-->
<!--                                                <?php endforeach; endif; else: echo "" ;endif; ?>-->
<!--                                            </select>-->
<!--                                        </div>-->
<!--                                    </td>-->
<!--                                </tr>-->
                                <tr style="display: none">
                                    <td><label>投稿功能</label></td>
                                    <td>
                                        <input type="radio" name="db[is_post]" value="1" title="开启"<?php if(!$db || $db['is_post'] == 1): ?> checked<?php endif; ?> />
                                        <input type="radio" name="db[is_post]" value="0" title="关闭"<?php if($db && $db['is_post'] == 0): ?> checked<?php endif; ?> />
                                    </td>
                                </tr>
                                <tr style="display: none">
                                    <td><label for="first_post_time">新会员投稿限制</label></td>
                                    <td><label>最新注册会员必须过</label><input type="text" name="db[first_post_time]" class="u-ipt u-ipt-tiny" id="first_post_time" value="<?php echo !empty($db['first_post_time']) ? htmlentities($db['first_post_time']) : 0; ?>" /><span>分钟才能投稿 (0为不限制)</span></td>
                                </tr>
                                <tr style="display: none">
                                    <td><label>微信端会员注册方式</label></td>
                                    <td>
                                        <input type="radio" name="db[wechat_reg]" value="1" title="自动"<?php if(!$db || $db['wechat_reg'] == 1): ?> checked<?php endif; ?> />
                                        <p class="label font-13">用户首次打开微信端商城,，会自动注册为会员，本微信会员与电脑端会员是两个会员账号。<br/>好处是可以自动完成会员注册。一般应用于只在微信端运营的商家。</p>
                                        <input type="radio" name="db[wechat_reg]" value="0" title="非自动"<?php if($db && $db['wechat_reg'] == 0): ?> checked<?php endif; ?> />
                                        <p class="label font-13">用户首次打开微信端商城,，不会自动注册为会员，需要进行普通会员注册或者登录会员账号与微信进行绑定，<br/>一般应用于电脑端与微信端会员账号统一管理。</p>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">附件设置</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><label for="attach_uri_prefix">附件地址前缀<em>*</em></label></td>
                                    <td><input type="text" name="file[attach_uri_prefix]" class="u-ipt u-ipt-def" id="attach_uri_prefix" value="<?php echo !empty($file['attach_uri_prefix']) ? htmlentities($file['attach_uri_prefix']) : '/'; ?>" /><span>必须以/结尾</span></td>
                                </tr>
                                <tr>
                                    <td><label for="upload_image_filesize">上传图片大小</label></td>
                                    <td><input type="text" name="db[upload_image_filesize]" class="u-ipt u-ipt-tiny" id="upload_image_filesize" value="<?php echo !empty($db['upload_image_filesize']) ? htmlentities($db['upload_image_filesize']) : htmlentities($site['default_upload_image_filesize']); ?>" /><span>KB</span></td>
                                </tr>
                                <tr>
                                    <td><label for="upload_image_filetype">上传图片扩展名</label></td>
                                    <td><input type="text" name="db[upload_image_filetype]" class="u-ipt u-ipt-long" id="upload_image_filetype" value="<?php echo !empty($db['upload_image_filetype']) ? htmlentities($db['upload_image_filetype']) : htmlentities($site['default_upload_image_filetype']); ?>" /><span>(多个请用“|”格开，如：.gif|.jpg)</span></td>
                                </tr>
                                <tr>
                                    <td width="15%"><label for="upload_attach_filesize">上传附件大小</label></td>
                                    <td><input type="text" name="db[upload_attach_filesize]" class="u-ipt u-ipt-tiny" id="upload_attach_filesize" value="<?php echo !empty($db['upload_attach_filesize']) ? htmlentities($db['upload_attach_filesize']) : htmlentities($site['default_upload_attach_filesize']); ?>" /><span>KB</span></td>
                                </tr>
                                <tr>
                                    <td><label for="upload_attach_filetype">上传附件扩展名</label></td>
                                    <td><input type="text" name="db[upload_attach_filetype]" class="u-ipt u-ipt-long" id="upload_attach_filetype" value="<?php echo !empty($db['upload_attach_filetype']) ? htmlentities($db['upload_attach_filetype']) : htmlentities($site['default_upload_attach_filetype']); ?>" /><span>(多个请用“|”格开，如：.gif|.jpg)</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">积分设置</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td width="15%"><label for="points_rate">积分现金比例</label></td>
                                    <td><label>1元=</label><input type="text" name="db[points_rate]" class="u-ipt u-ipt-tiny" id="points_rate" value="<?php echo !empty($db['points_rate']) ? htmlentities($db['points_rate']) : 1; ?>" /><span>积分</span></td>
                                </tr>
                                <tr>
                                    <td><label for="register_points">注册赠送</label></td>
                                    <td><input type="text" name="db[register_points]" class="u-ipt u-ipt-tiny" id="register_points" value="<?php echo !empty($db['register_points']) ? htmlentities($db['register_points']) : 0; ?>" /><span>积分</span></td>
                                </tr>
                                <tr>
                                    <td><label for="order_points_rate">购物送积分</label></td>
                                    <td><label>利润的</label><input type="text" name="db[order_points_rate]" class="u-ipt u-ipt-tiny" id="order_points_rate" value="<?php echo !empty($db['order_points_rate']) ? htmlentities($db['order_points_rate']) : 0; ?>" /><span>%</span></td>
                                </tr>
                                <tr>
                                    <td><label for="points_buy_limit">积分支付</label></td>
                                    <td><label>商品价格超过</label><input type="text" name="db[points_buy_limit]" class="u-ipt u-ipt-tiny" id="points_buy_limit" value="<?php echo !empty($db['points_buy_limit']) ? htmlentities($db['points_buy_limit']) : 0; ?>" /><span>元可以使用积分支付</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">抵用券设置</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td width="15%"><label for="vouchers_rate">抵用券现金比例</label></td>
                                    <td><label>1元=</label><input type="text" name="db[vouchers_rate]" class="u-ipt u-ipt-tiny" id="vouchers_rate" value="<?php echo !empty($db['vouchers_rate']) ? htmlentities($db['vouchers_rate']) : 1; ?>" /><span>抵用券</span></td>
                                </tr>
                                <tr>
                                    <td><label for="vouchers_buy_limit">抵用券支付</label></td>
                                    <td><label>商品价格超过</label><input type="text" name="db[vouchers_buy_limit]" class="u-ipt u-ipt-tiny" id="vouchers_buy_limit" value="<?php echo !empty($db['vouchers_buy_limit']) ? htmlentities($db['vouchers_buy_limit']) : 0; ?>" /><span>元可以使用抵用券支付</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">股东设置</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td width="15%"><label for="day_separate_rate">股东分润</label></td>
                                    <td><label>商城每日利润的</label><input type="text" name="db[day_separate_rate]" class="u-ipt u-ipt-tiny" id="day_separate_rate" value="<?php echo !empty($db['day_separate_rate']) ? htmlentities($db['day_separate_rate']) : 0; ?>" /><span>%，在 00:00 自动给股东分润</span></td>
                                </tr>
                                <tr>
                                    <td><label for="min_cash_money">最低提现金额</label></td>
                                    <td><input type="text" name="db[min_cash_money]" class="u-ipt u-ipt-tiny" id="min_cash_money" value="<?php echo !empty($db['min_cash_money']) ? htmlentities($db['min_cash_money']) : 0; ?>" /><span>元</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                            <tr>
                                <th colspan="2">分销设置</th>
                            </tr>
                            </thead>
                            <tbody>
                            <!--<tr>-->
                                <!--<td width="15%"><label for="day_separate_rate">如何设置分销</label></td>-->
                                <!--<td><label>满多少金额成为分销商</label><input type="text" name="db[fx_money]" class="u-ipt u-ipt-tiny" id="day_separate_rate" value="<?php echo !empty($db['fx_money']) ? htmlentities($db['fx_money']) : 0; ?>" /><span>元</span></td>-->
                            <!--</tr>-->
                            <!--<tr>-->
                                <!--<td><label for="min_cash_money">设置分类成为分销商</label></td>-->
                                <!--<td>-->

                                    <!--<select name="db[fx_class]">-->

                                        <!--<?php if(is_array($fx_list) || $fx_list instanceof \think\Collection || $fx_list instanceof \think\Paginator): if( count($fx_list)==0 ) : echo "" ;else: foreach($fx_list as $key=>$item): ?>-->
                                        <!--<option value="<?php echo htmlentities($item['id']); ?>"<?php if(isset($db['fx_class']) and $db['fx_class'] == $item['id']): ?> selected<?php endif; ?>><?php echo htmlentities($item['name']); ?></option>-->
                                        <!--<?php endforeach; endif; else: echo "" ;endif; ?>-->
                                    <!--</select>-->

                                <!--</td>-->
                            <!--</tr>-->
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为熊王需购买产品数量</label></td>
                                <td><input type="text" name="db[xw_num]" class="u-ipt u-ipt-tiny" id="xw_num" value="<?php echo !empty($db['xw_num']) ? htmlentities($db['xw_num']) : 0; ?>" /><span>箱</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为大熊需购买产品数量</label></td>
                                <td><input type="text" name="db[dx_num]" class="u-ipt u-ipt-tiny" id="dx_num" value="<?php echo !empty($db['dx_num']) ? htmlentities($db['dx_num']) : 0; ?>" /><span>箱</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为小熊需购买产品数量</label></td>
                                <td><input type="text" name="db[xx_num]" class="u-ipt u-ipt-tiny" id="xx_num" value="<?php echo !empty($db['xx_num']) ? htmlentities($db['xx_num']) : 0; ?>" /><span>箱</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为熊宝需购买产品数量</label></td>
                                <td><input type="text" name="db[xb_num]" class="u-ipt u-ipt-tiny" id="xb_num" value="<?php echo !empty($db['xb_num']) ? htmlentities($db['xb_num']) : 0; ?>" /><span>箱</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为熊王需充值金额</label></td>
                                <td><input type="text" name="db[xw_money]" class="u-ipt u-ipt-tiny" id="xw_money" value="<?php echo !empty($db['xw_money']) ? htmlentities($db['xw_money']) : 0; ?>" /><span>元</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为大熊需充值金额</label></td>
                                <td><input type="text" name="db[dx_money]" class="u-ipt u-ipt-tiny" id="dx_money" value="<?php echo !empty($db['dx_money']) ? htmlentities($db['dx_money']) : 0; ?>" /><span>元</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为小熊需充值金额</label></td>
                                <td><input type="text" name="db[xx_money]" class="u-ipt u-ipt-tiny" id="xx_money" value="<?php echo !empty($db['xx_money']) ? htmlentities($db['xx_money']) : 0; ?>" /><span>元</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为熊宝需充值金额</label></td>
                                <td><input type="text" name="db[xb_money]" class="u-ipt u-ipt-tiny" id="xb_money" value="<?php echo !empty($db['xb_money']) ? htmlentities($db['xb_money']) : 0; ?>" /><span>元</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">不同等级显示的价格</label></td>
                                <td><input type="text" name="db[fx_bl]" class="u-ipt u-ipt-tiny" id="fx_bl" value="<?php echo !empty($db['fx_bl']) ? htmlentities($db['fx_bl']) : 0; ?>" />
                                    <span>备注：顺序为 游客,熊宝,小熊,大熊,熊王 格式为 100,50,40,30,20 单位为 元</span></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>

                    <div class="m-form-btn"><input type="hidden" name="option_name" value="app_info" /><input type="hidden" name="id" value="1"><button id="j_btn" class="u-btn">确定提交</button></div>
                </form>
            </div>
        </div>
    </div>
</div>

<?php endif; ?>
<input type="hidden" name="action_uri" value="<?php echo url('action'); ?>" />

<input type="hidden" name="redirect_uri" value="<?php echo url('index'); ?>" />

<input type="hidden" name="region_uri" value="/manage/regions/regions" />
<script src="/static/public/js/jquery-1.10.2.js"></script>
<script src="/static/public/js/maniac.ui.js"></script>
<script src="/static/public/layui/layui.js" charset="utf-8"></script>
<script src="/static/public/js/aes.js"></script>
<script src="/static/public/js/mode-ecb-min.js"></script>
<script src="/static/public/js/utils.js"></script>
<script src="/static/public/js/dialog.js"></script>
<script src="/static/manage/js/form.js"></script>
<script src="/static/manage/js/js.js"></script>
<script src="/static/public/js/app.js"></script>
<script src="/static/public/js/encrypt.js"></script>
<script src="/static/public/dist/zoomify.min.js"></script>
<script type="text/javascript">
    $('.fdzoom').zoomify();
</script>

<script>
var aesKey = '<?php echo htmlentities($encrypt_key); ?>';
    $(function(){
        layui.use('layer', function(){
            var user_exists = parseInt('<?php echo !empty($user_exists) ? 1  :  0; ?>');
            var user_forbidden = parseInt('<?php echo !empty($user_forbidden) ? 1  :  0; ?>');
            var quit_force = parseInt('<?php echo !empty($quit_force) ? 1  :  0; ?>');
            var is_auth    = parseInt('<?php echo !empty($is_auth) ? 1  :  0; ?>');
            
            if (user_exists) {
                dialog.error('您所登录的用户已被删除', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }
            
            if (user_forbidden) {
                dialog.error('您的账户已被禁用', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }

            if (quit_force) {
                dialog.error('同一账户同一时间只能一人在线', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }
            
            if (!is_auth) {
                dialog.error('您没有权限执行此操作', function(){
                    window.location.href = history.go(-1);
                    return false;
                });
            }
        });
    })
</script>

</body>
</html>